﻿using System;

namespace Borg.Framework
{
    public abstract class Action
    {
        internal QualifyDelegate Qualify = null;
        internal SlotInfo Slot = null;

        protected Action(SlotInfo slot, QualifyDelegate qualify)
        {
            Qualify = qualify;
            Slot = slot;
        }

        protected Action(SlotInfo slot, string param, object value)
            : this(slot, plugType => value.Equals(plugType.GetParamValue(param)))
        { }

        public abstract void Do(object s, EventArgs args);
    }
}

